package com.example.card.transactionimplementation;

import com.example.card.abstracttransactions.UserCheckTransaction;
import com.example.card.domain.user.OilCoin;
import com.example.card.domain.user.User;

/**
 *
 */
public class AddOilCoinTransaction extends UserCheckTransaction {
    private final int type;
    private final int number;

    public AddOilCoinTransaction(int memberId, int type, int number) {
        super(memberId);
        this.type = type;
        this.number = number;
    }

    @Override
    public  void realExecute(User user) {
        OilCoin oilCoin = new OilCoin(type, number);
        user.addCoin(oilCoin);
        // FIXME: 2023/12/13 可以入库
    }

}
